import React, { useState } from 'react';
import { Button, Modal } from 'antd';
import style from './size.module.css'
import { useNavigate } from 'react-router-dom';

function Size({isModalOpen, setIsModalOpen}) {
    const navigate=useNavigate();
  const handleOk = () => {
    setIsModalOpen(false);
  };

  const handleCancel = () => {
    setIsModalOpen(false);
  };
  const toDesign=()=>{
    navigate('../../view/Createtemplate/index.tsx')
  }
  return (
    <div className={style.modalsize}>
      <Modal title="自定义尺寸" open={isModalOpen} onOk={handleOk} onCancel={handleCancel} footer={null}>
        <button className={style.btn} onClick={toDesign}>创建设计</button>
      </Modal>
    </div>
  );
}

export default Size;
